{% extends 'news/base.html' %}

{% load static %}
{% block style %}

    <link rel="stylesheet" href="{% static 'news/css/hy.css' %}">
    <link rel="stylesheet" href="{% static 'news/css/jifen.css' %}">

{% endblock %}

{% block c_right %}
    <form action="{% url 'news:jfdh' %}" method="post">
        {% csrf_token %}
        <div class="dang">
            <div class="wo">
                <div></div><b>我的积分</b>
                <span>当前剩余积分: <a>{{ author.score }}</a> </span>
                <input type="submit" value="兑换会员">
            </div>
            <p></p>

            <div class="hui">
                <div class="vip_0"></div><b>积分说明 </b><h1>▶</h1>
                <span>
                本积分与cny兑换比例为10:1cny.可与XXX币做等值兑换. <br>
                用户每分享一次新闻给好友,只要好友允许获取微信openid并打开,即可获得1积分,最多5积分,同一个新闻每个用户第一次阅读有效...
            </span>
                <p></p>
            </div>

            <div class="buy">
                {#            <h3>{{ error_info }}</h3>#}
                <div></div><b>积分账单</b>

                {% for bill in contacts %}
                    <p>
                        <span>{{ bill.title }}</span>
                        <span> {{ bill.score }}</span>
                        <span> {{ bill.cost_date|date:'Y-m-d' }}</span>
                    </p>
                {% endfor %}
                <nav aria-label="Page navigation">
                    <ul class="pagination pagination-lg">
                        {% if contacts.has_previous %}
                            <li style="float: left">
                                <a href="?page={{ contacts.previous_page_number }}" aria-label="Previous" target="_parent" >
                                    <span aria-hidden="true" style="position: absolute; margin: 200px 0 0 290px;">&laquo;</span>
                                </a>
                            </li>
                        {% endif %}

                            <li style="float: left;margin-left:300px ;"  class="active">
                            {% for pg in contacts.paginator.page_range %}
                                <a href="{% url 'news:jifen' %}?page={{ pg }}" target="_parent" class="box" style="display: inline-block; width: 20px; height: 20px;margin: 200px 0 0 2px; border: 1px solid black;text-align: center;line-height: 20px;">{{ pg }}</a>
                            {% endfor %}
                            </li>

                        {% if contacts.has_next %}
                            <li>
                                <a href="?page={{ contacts.next_page_number }}" aria-label="Next" target="_parent">
                                    <span aria-hidden="true" style="float: left; margin: 200px 0 0 10px; ">&raquo;</span>
                                </a>
                            </li>
                        {% endif %}
                    </ul>
                </nav>
            </div>
        </div>

        {# 分页 #}


    </form>



{% endblock %}
{% block js %}
    <script src="/static/js/jQuery.js"></script>
    <script>




    </script>


{% endblock %}